/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.faare.service.services.views;

import javax.swing.tree.DefaultMutableTreeNode;


/**
 * This class is used by the ViewGenerator object to store the treeviews.<br>
 *
 */
public class TreeNode
{
    /** Default mutable tree node. */
    private DefaultMutableTreeNode defaultMutableTreeNode;

    /** TreeView associated to the TreeNode. */
    private TreeView view;

    /**
     * This method allows to get the swing object of the treeviews of the
     *  active current user profile, such as deployed to the present instant.
     *
     * @return The DefaultMutableTreeNode object.
     */
    public DefaultMutableTreeNode getDefaultMutableTreeNode()
    {
        return defaultMutableTreeNode;
    }

    /**
     * Returns the view asscoiated to the TreeNode.
     *
     * @return The view.
     */
    public TreeView getView()
    {
        return view;
    }

    /**
     * Sets the defaultMutableTreeNode.
     *
     * @param adefaultMutableTreeNode  The defaultMutableTreeNode to set.
     */
    public void setDefaultMutableTreeNode(
        DefaultMutableTreeNode adefaultMutableTreeNode)
    {
        this.defaultMutableTreeNode = adefaultMutableTreeNode;
    }

    /**
     * Sets the view associated to the TreeNode.
     *
     * @param aview  The view to set.
     */
    public void setView(TreeView aview)
    {
        this.view = aview;
    }
}
